<?php

namespace App\Http\Controllers\Api;

use App\Utils\VerifyRequestInput;
use Illuminate\Http\JsonResponse;

class ConfigController extends ApiController
{
    # 商品（图片）类型分类
    const GOODS_TYPE_LIST = [
        ['id' => 1, 'value' => '推荐'],
        ['id' => 2, 'value' => '新品'],
        ['id' => 3, 'value' => '版权'],
        ['id' => 4, 'value' => '品牌'],
        ['id' => 5, 'value' => '全部'],
    ];

    # 地区分类
    const AREA_LIST = [
        ['id'   => 1, 'value' => '毛绒之家'],
        ['id'   => 2, 'value' => '订单生产'],
    ];

    /**
     * 获取配置信息
     * @return JsonResponse
     */
    public function getConfig(): JsonResponse
    {
        $config = [
            'type'   => self::GOODS_TYPE_LIST,
            'area'   => self::AREA_LIST,
            'image' => 'http://cms.toysmodel.cn/quanzi.png',
            'nh' => [
                'default' => 'http://hb.toysmodel.cn/storage/images/gcdd0.png',
                'selected' => 'http://hb.toysmodel.cn/storage/images/gcdd1.png'
            ],
            'wapPay'  => false,
            // 代发
            'orderCancelInterval' => 24 * 3600,
            'orderFinishInterval' => 30 * 24 * 3600,
            'Mobile' => '15861388608',
            'Address' => '江苏省扬州市邗江区朱塘路110号普创电子二楼右门',
            'Name' => '退货组',
            'DF_Notice' => "1.正常工作日，16点之前订单尽量当天发货（档口关门或缺货情况第二天会继续拿货发出），16点之后的订单第二天发货。\n 2.除劳动节，国庆节，春节等重大节日放假外，其他一律无休。\n3.为保证发货质量，3公斤以上货物，统一发申通快递。\n4.由于各电商平台快递单号类型不同，请选择对应的平台快递下单，避免物流单号发不了货。\n5.如规格，价格有误，以商家实际价格为准，请联系客服修改。\n6.平台商品不支持7天无理由退货。",
            // 退单
            'express_company' => '申通，圆通，中通，韵达，极兔，邮政，顺丰，丰网',
            'wechat_df_service' => 'https://work.weixin.qq.com/kfid/kfc502514268be0b712',
            'wechat_bh_service' => 'https://work.weixin.qq.com/kfid/kfc502514268be0b712',
        ];
        return $this->success($config);
    }

}
